package com.gxa.mapper;

import com.gxa.param.ContractParam;
import com.gxa.param.TableParam;
import com.gxa.pojo.Contract;
import com.gxa.pojo.ContractCategory;
import com.gxa.pojo.ContractStatus;
import com.gxa.pojo.Empl;
import org.apache.ibatis.annotations.Param;

import java.sql.Time;
import java.sql.Timestamp;
import java.util.List;

public interface ContractMapper {

    /**
     * 查询所有
     * @return
     */
    List<Contract> findAll(@Param("param") ContractParam param);

    Empl findEmplByName(@Param("emplName") String emplName);

    List<ContractCategory> findAllCategory();

    List<ContractStatus> findAllStatus();

    int add(@Param("contract") Contract contract);

    int update(@Param("contract") Contract contract);

    void deleteAll(@Param("ids") String[] ids);

    void submit(@Param("id") Integer id,@Param("statusId") Integer statusId);

    void updateContractAudit(@Param("id")Integer id, @Param("statusId")Integer statusId, @Param("emplId")Integer emplId, @Param("lastOpdate")Timestamp lastOpdate);

    void addAudit(@Param("id")Integer id,@Param("statusId")Integer statusId,@Param("advice") String advice);

    Contract findById(@Param("id") Integer id);

}
